{% extends "layout.html" %}

{% block title %}foursquare-latitude: User{% endblock title %}
{% block main %}
  <h1>Welcome! {{ user.google_user.nickname }}</h1>

  <blockquote>
	Not sure what to do? Click <a href="/start">here</a> to authenticate
	foursquare and latitude. Then, click <a href="/nearby">here</a> to see what
	foursquare venues are near you right now. Or, click
	<a href="/trips">trips</a> to build a list of places.
  </blockquote>

  <h2>What we know about you</h2>
  <dl>
    <dt>email</dt>
    <dd>{{ user.google_user.email }}</dd>

    <dt>nickname</dt>
    <dd>{{ user.google_user.nickname }}</dd>

    {% if user.buzz_url %}
    <dt>buzz_url</dt>
    <dd><a href="{{ user.buzz_url }}">{{ user.buzz_url }}</a>
        - (<a href="/webfinger?gohome">Update</a>)</dd>
    {% endif %}

    {% if user.foursquare_url %}
    <dt>foursquare_url</dt>
    <dd><a href="{{ user.foursquare_url }}">{{ user.foursquare_url }}</a>
        - (<a href="/foursquare?gohome">Update</a>)</dd>
    {% endif %}

  </dl>

  <h2>Services</h2>
  <ul>
    {% for service in services %}
    <li>{{ service }}
        <a href="/start?service_name={{ service }}">(re-authorize)</a></li>
    {% endfor %}
    {% for service in expected_services %}
    <li>{{ service }}
        <a href="/start?service_name={{ service }}">(start)</a></li>
    {% endfor %}
  </ul>

  {% if expected_services %}
    <a href="/start">Click here to authorize all services!</a>
  {% endif %}

  <h2>Itineraries</h2>
  <ul>
    {% for itinerary in itineraries %}
    <li><a href="/itinerary?key={{ itinerary.key }}">{{ itinerary.title }}</a>
        (<a href="/trips?key={{ itinerary.key }}">edit</a>)</li>
    {% endfor %}

{% endblock main %}

{% block sidebar_content %}
{% endblock sidebar_content %}

{% block bottom_block %}
{% endblock bottom_block %}
